home *** CD-ROM | disk | FTP | other *** search
- Sub GetResponse()
-
- 'Create a recall network object
- Dim nn As New NSRecallNetwork
-
- 'Set the path to the generated neural network DLL
- nn.dllPathName = g_CSWPath + "\Demo\DemoMLP.dll"
-
- 'Load the network weights that were saved after training in NeuroSolutions
- nn.loadWeights g_CSWPath + "\Demo\DemoMLP.nsw"
-
- 'Get the input data entered in to the "Input Data" text boxes
- Dim InputData(0 To 1, 0 To 0) As Variant
- InputData(0, 0) = CSng(InputDataTextBox1.Text)
- InputData(1, 0) = CSng(InputDataTextBox2.Text)
-
- 'Send the input data to the neural network DLL
- nn.InputData = InputData
-
- 'Get the network response (output) for the specified input data
- Dim OutputData As Variant
- OutputData = nn.GetResponse
-
- 'Display the network output in "Output Data" text box
- OutputDataTextBox.Text = OutputData(0, 0)
- Me.OutputDataTextBox.Refresh
-
- End Sub
-